/* 
 * File:   main.cpp
 * Author: Aaron
 *
 * Created on 19. Februar 2011, 15:21
 */

#include <cstdlib>
#include <iostream>
#include "OpenCLWrapping.hpp"

using std::cout;
using std::endl;
using OpenCLWrapping::Platform;
using OpenCLWrapping::Device;
/*
 * 
 */
int main(int argc, char** argv)
{
    cout << "-------------------" << endl;
    cout << "--- OpenCL Info ---" << endl;
    cout << endl;

    vector<Platform> platforms = Platform::getPlatforms();
    for (int i = 0; i < platforms.size(); ++i)
    {
        Platform pl = platforms[i];
        cout << "Platform ( " << i << " )" << endl;
        cout << "Name: " << pl.getName() << endl;
        cout << "Vendor: " << pl.getVendor() << endl;
        cout << endl;
        cout << "Devices:" << endl;

        vector<Device> devices = pl.getDevices();
        for (int j = 0; j < devices.size(); ++j)
        {
            Device dev = devices[j];
            cout << "Name: " << dev.getName() << endl;
            cout << "Compute Units: " << dev.getComputeUnits() << endl;
            cout << "Clock Frequency: " << dev.getClockFrequency() << endl;
            cout << "Global Memory Size: " << dev.getGlobalMemorySize() << endl;
            cout << "Device Version: " << dev.getDeviceVersion() << endl;
            cout << "OpenCL C Version: " << dev.getCLVersion() << endl;
        }
   
    }
    cout << "-------------------" << endl;
}

